cgroup: Fix automatic disabling of cgroup "memory"
authorPhil Elwell <phil@raspberrypi.org>
Mon, 27 Nov 2017 17:14:54 +0000 (17:14 +0000)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:57:25 +0000 (15:57 +0100)
commit770a0c15ea83972ff5058717d477796996e970fa
treed95e89e145dc90c9893da7f43cc126c8133b0c40
parentbaa23f588a69c0d680e790de845affe546cab4e5
cgroup: Fix automatic disabling of cgroup "memory"

Some Raspberry Pis have limited RAM and most users won't use the
cgroup memory support so it is disabled by default. The previous
implementation relied on the memory cgroup being encountered first,
which is not guaranteed to be the case. Change the implementation
to be registration-order-agnostic.

See: https://github.com/raspberrypi/issues/1950

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
kernel/cgroup.c